<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/init.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<jsp:include page="/WEB-INF/jsp/common/common.jsp" />
	<script type="text/javascript">
		function query(){
			$("#form1").submit();
		}
		
		function noInstall(seal_id){
			if(confirm("确认要卸载吗？")){
		
				$.ajax({
					type:"post",
					url:"${path}/ix/seal/set/install/operate.htm",
					data:{seal_id:seal_id},
					success: function(data){
						location.reload();
						ohSnap(data, "success");
					}
				});	
			}		
		}
		
		function goEdit(seal_id){
			$("input[name='seal_id']").val(seal_id);
			
			var url = "${path}/ix/seal/set/install/edit_form.htm";
			$("#form1").attr("action",url);
			$("#form1").submit();
		}
	</script>
</head>
<body>
<jsp:include page="/WEB-INF/jsp_lib/tip.jsp" />
	<div>
		<form action="${path}/ix/seal/set/install/list.htm" id="form1" method="post">
			<input type="hidden" name="seal_id" />
			<h2>
				<div>印章安装卸载</div>
			</h2>
			<div class="query">
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
					<tr>
						<td width="80" align="right">
							<strong>印章名称：</strong>
						</td>
						<td width="200" align="left">
							<input name="srh_name" type="text" /> 
						</td>
						<td align="left">
							<a href="javascript:query();">
								<img src="${path}/style_cp/img/query.jpg" name="Image4" width="85" height="27" border="0" id="Image4" /> 
							</a>
						</td>
					</tr>
				</table>
			</div>
			
			<table width="100%" class="listlindex">
				<tr>
					<th>印章名称</th>
					<th>印模图片</th>
					<th>印章种类</th>
					<th>印章类型</th>
					<th>刻章字样</th>
					<th>印控仪</th>
					<th>位置</th>
					<th>操作</th>
				</tr>
				<c:if test="${fn:length(list)==0}">
					<tr>
						<td colspan="8"><div class="tip_div">暂无记录.</div></td>
					</tr>
				</c:if>	
				<c:forEach items="${list}" var="v">					
					<tr>
						<c:if test="${v.use_user_id!=user._id}">
						<td style="color:#186ccf">${v.name}  【${v.uname}】</td>
						</c:if>
						<c:if test="${v.use_user_id==user._id}">
						<td>${v.name}</td>
						</c:if>
						<td><img src='${path}/img/${v.file_id}.htm?mh=50&mw=50'/></td>
						<td>${v.seal_type_name}</td>
						<td>${v.seal_type_config_name}</td>
						<td>${v.title}</td>
						<td>${v.code}</td>
						<td>${v.position}</td>
						<td class="sta">
							<c:if test="${v.flag_use_status=='未安装'}"><a href="javascript:goEdit('${v._id}');">【安装】</a></c:if>
							<c:if test="${v.flag_use_status=='已安装'}"><a href="javascript:noInstall('${v._id}');">【卸载】</a></c:if>
							<c:if test="${fn:length(v.flag_change)!=0}">【${v.flag_change}】</c:if>
						</td>
					</tr>
				</c:forEach>
			</table>	
			<div id="response"></div>
			<div class="options">
				<p>
				</p>
				<div class="quotes">
					<page:page page="${page}" />
				</div>
				<div class="clear"></div>
			</div>	
			
		</form>	
		
	</div>
</body>
</html>